<!DOCTYPE html>
<html>
<head>
    <title>发票表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <i-col span="4">
                <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
            </i-col>
            <i-button class="btn btn-primary" @click="query">查询</i-button>
			<#if shiro.hasPermission("lanling:invoice:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("lanling:invoice:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("lanling:invoice:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <i-form ref="formValidate" :model="invoice" :rules="ruleValidate" :label-width="80" class="form-horizontal">
            <Form-item label="姓名" prop="username">
                <i-input v-model="invoice.username" placeholder="姓名"/>
            </Form-item>
            <Form-item label="手机号码" prop="phoneNum">
                <i-input v-model="invoice.phoneNum" placeholder="手机号码"/>
            </Form-item>
            <Form-item label="公司名" prop="companyName">
                <i-input v-model="invoice.companyName" placeholder="公司名"/>
            </Form-item>
            <Form-item label="交费方法" prop="paymentMethod">
                <Radio-group v-model="invoice.paymentMethod">
                    <Radio label="1">
                        <span>线上交费</span></Radio>
                    <Radio label="2">
                        <span>现场交费</span></Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="请选择科目" prop="invSubjectId">
                <i-select v-model="invoice.invSubjectId" filterable label-in-value>
                    <i-option v-for="item in subjectList" :value="item.id"
                              :key="item.id">{{item.subjectName}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="税号" prop="taxNum">
                <i-input v-model="invoice.taxNum" placeholder="税号"/>
            </Form-item>
            <Form-item label="报名人数" prop="applyNum">
                <Input-number style="width: 188px;"  :min="0"  v-model="invoice.applyNum" placeholder="报名人数"/>
            </Form-item>
            <Form-item label="发票内容" prop="invoiceContent">
                <i-input v-model="invoice.invoiceContent" placeholder="发票内容"/>
            </Form-item>
            <Form-item label="收据号" prop="receiptNum">
                <i-input v-model="invoice.receiptNum" placeholder="收据号"/>
            </Form-item>
            <Form-item label="科目金额" prop="subSum">
                <i-input v-model="invoice.subSum" placeholder="科目金额"/>
            </Form-item>
            <Form-item label="备注" prop="remark">
                <i-input type="textarea" :rows="4" v-model="invoice.remark" placeholder="备注"/>
            </Form-item>
            <Form-item label="是否处理" prop="dispose">
                <Radio-group v-model="invoice.dispose">
                    <Radio label="1">
                        <span>处理</span></Radio>
                    <Radio label="2">
                        <span>未处理</span></Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
            </Form-item>
        </i-form>
    </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/lanling/invoice.js?_${.now?long}"></script>
</body>
</html>